import axios from '@/api/axios'

// 登录
export function loginApi(params) {
  return axios.post('/auth/security/login', params, { meta: { noAuth: true }})
}
// 登出
export function logoutApi() {
  return axios.post('/auth/security/logout')
}

// 修改密码
export function editPasswordApi(params) {
  return axios.post('/manage/petUser/editPassword', params)
}

// 获取当前登录用户的用户信息
export function getUserInfoApi() {
  return axios.get('/auth/loginController/getUserInfo')
}
// 获取当前角色的菜单列表
export function userMenuListApi() {
  return axios.get(`/user/inspectionMenuController/getListByRoleId`)
}
// 获取当前角色的菜单树
export function userMenuTreeListApi() {
  return axios.get(`/user/inspectionMenuController/getTreeByRoleId`)
}
// 密码验证
export function validatePasswordApi(params) {
  return axios.post('/user/inspectionLoginUser/passwordCheck', params)
}

// 修改密码
export function modifyPasswordApi(params) {
  return axios.post('/user/inspectionLoginUser/resetPassword', params)
}